<template>
   <div>
     <h1>父组件</h1>
     <div>{{num}}</div>
     <button @click="num++">+</button>
     <div>
        {{personInfo}}<br>
        <button @click="personInfo.age++">对象中属性的更改</button>
        <button @click="personInfo={...personInfo,sex:'女'}">更改对象</button>
     </div>
     <hr>
     <Child :count="num" :personInfo="personInfo"></Child>
   </div>
</template>

<script>
import Child from './components/Child.vue'
export default {
  components:{Child},
  data(){
    return{
      num:10,
      personInfo:{
        name:'Giles',
        age:39
      }
    }
  }
}
</script>

<style>

</style>